import request from '@/utils/request'

// 查询门店配置列表
export function listCrmSet(query) {
  return request({
    url: '/crmset/crmSet/list',
    method: 'get',
    params: query
  })
}

// 查询门店配置详细
export function getCrmSet(id) {
  return request({
    url: '/crmset/crmSet/' + id,
    method: 'get'
  })
}

// 新增门店配置
export function addCrmSet(data) {
  return request({
    url: '/crmset/crmSet',
    method: 'post',
    data: data
  })
}

// 修改门店配置
export function updateCrmSet(data) {
  return request({
    url: '/crmset/crmSet',
    method: 'put',
    data: data
  })
}

// 删除门店配置
export function delCrmSet(id) {
  return request({
    url: '/crmset/crmSet/' + id,
    method: 'delete'
  })
}

// 打开页面
export function opencrm(userID) {
  return request({
    url: '/crmset/crmSet/openweb/',
    method: 'post',
    data: {userID}
  })
}
